<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" type="text/css" href="../../css/reset.css"/>
		<link rel="stylesheet" type="text/css" href="../../css/list.css"/>
		<link href="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.css" rel="stylesheet">
		<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
		<script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/bootstrap-table.min.js"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/bootstrap-table/1.17.1/locale/bootstrap-table-zh-CN.min.js"></script>
		<script src="../../../qrcode/jquery2.1.4.js"></script>
		<script src="../../../js/request.js"></script>
	</head>
	<body>
		<table id="table" class="tab tab-hover">
			<tr class="active">
				<th>编号</th><th>用户名</th><th>手机号码</th><th>密码</th><th>注册时间</th><th>上次登陆时间</th>
			</tr>
		</table>
	</body>
<script>
	$(function(){
		$.post("/user/list.do",function(data){
			let table = $("#table");
			let item = "";
			for(let i = 0 ; i < data.length ; i ++){
				item = "<tr>";
				// for(let key in data[i]){
				// 	item +="<td>"+data[i][key]+"</td>";
				// }
				item += "<td>"+data[i].id +"</td>" + "<td>"+data[i].username +"</td>" +
						"<td>"+data[i].userPhone +"</td>" +"<td>"+data[i].password +"</td>" +
						"<td>"+data[i].createTime +"</td>" +"<td>"+data[i].loginTime +"</td>" ;
				item +="</tr>";
				table.append(item);
			}
		},"json");
	})
</script>
</html>
